
package com.jiuqi.irs.generator.form;

import java.text.ParseException;
import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for tbPayeeaccount.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="tbPayeeaccountForm"
 */
public class TbPayeeaccountForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _paGuid = null;
   private java.lang.String _orgCode = null;
   private java.lang.String _payeeAccount = null;
   private java.lang.String _proxyBank = null;
   private java.lang.String _payeeBankcode = null;
   private java.lang.String _payeeBank = null;
   private java.lang.String _payeeName = null;
   private java.lang.String _payeeYear = null;
   private java.lang.String _reserved1 = null;
   private java.lang.String _reserved2 = null;
   private java.lang.String _reserved3 = null;

   /**
    * Standard constructor.
    */
   public TbPayeeaccountForm() {
   }

   /**
    * Returns the paGuid
    *
    * @return the paGuid
    */
   public java.lang.String getPaGuid() {
      return _paGuid;
   }

   /**
    * Sets the paGuid
    *
    * @param paGuid the new paGuid value
    */
   public void setPaGuid(java.lang.String paGuid) {
      _paGuid = paGuid;
   }
   /**
    * Returns the orgCode
    *
    * @return the orgCode
    */
   public java.lang.String getOrgCode() {
      return _orgCode;
   }

   /**
    * Sets the orgCode
    *
    * @param orgCode the new orgCode value
    */
   public void setOrgCode(java.lang.String orgCode) {
      _orgCode = orgCode;
   }
   /**
    * Returns the payeeAccount
    *
    * @return the payeeAccount
    */
   public java.lang.String getPayeeAccount() {
      return _payeeAccount;
   }

   /**
    * Sets the payeeAccount
    *
    * @param payeeAccount the new payeeAccount value
    */
   public void setPayeeAccount(java.lang.String payeeAccount) {
      _payeeAccount = payeeAccount;
   }
   /**
    * Returns the proxyBank
    *
    * @return the proxyBank
    */
   public java.lang.String getProxyBank() {
      return _proxyBank;
   }

   /**
    * Sets the proxyBank
    *
    * @param proxyBank the new proxyBank value
    */
   public void setProxyBank(java.lang.String proxyBank) {
      _proxyBank = proxyBank;
   }
   /**
    * Returns the payeeBankcode
    *
    * @return the payeeBankcode
    */
   public java.lang.String getPayeeBankcode() {
      return _payeeBankcode;
   }

   /**
    * Sets the payeeBankcode
    *
    * @param payeeBankcode the new payeeBankcode value
    */
   public void setPayeeBankcode(java.lang.String payeeBankcode) {
      _payeeBankcode = payeeBankcode;
   }
   /**
    * Returns the payeeBank
    *
    * @return the payeeBank
    */
   public java.lang.String getPayeeBank() {
      return _payeeBank;
   }

   /**
    * Sets the payeeBank
    *
    * @param payeeBank the new payeeBank value
    */
   public void setPayeeBank(java.lang.String payeeBank) {
      _payeeBank = payeeBank;
   }
   /**
    * Returns the payeeName
    *
    * @return the payeeName
    */
   public java.lang.String getPayeeName() {
      return _payeeName;
   }

   /**
    * Sets the payeeName
    *
    * @param payeeName the new payeeName value
    */
   public void setPayeeName(java.lang.String payeeName) {
      _payeeName = payeeName;
   }
   /**
    * Returns the payeeYear
    *
    * @return the payeeYear
    */
   public java.lang.String getPayeeYear() {
      return _payeeYear;
   }

   /**
    * Sets the payeeYear
    *
    * @param payeeYear the new payeeYear value
    */
   public void setPayeeYear(java.lang.String payeeYear) {
      _payeeYear = payeeYear;
   }
   /**
    * Returns the reserved1
    *
    * @return the reserved1
    */
   public java.lang.String getReserved1() {
      return _reserved1;
   }

   /**
    * Sets the reserved1
    *
    * @param reserved1 the new reserved1 value
    */
   public void setReserved1(java.lang.String reserved1) {
      _reserved1 = reserved1;
   }
   /**
    * Returns the reserved2
    *
    * @return the reserved2
    */
   public java.lang.String getReserved2() {
      return _reserved2;
   }

   /**
    * Sets the reserved2
    *
    * @param reserved2 the new reserved2 value
    */
   public void setReserved2(java.lang.String reserved2) {
      _reserved2 = reserved2;
   }
   /**
    * Returns the reserved3
    *
    * @return the reserved3
    */
   public java.lang.String getReserved3() {
      return _reserved3;
   }

   /**
    * Sets the reserved3
    *
    * @param reserved3 the new reserved3 value
    */
   public void setReserved3(java.lang.String reserved3) {
      _reserved3 = reserved3;
   }


   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getPaGuid() == null) {
         errors.add("paGuid", new ActionError("error.paGuid.required"));
      }
      if(getOrgCode() == null) {
         errors.add("orgCode", new ActionError("error.orgCode.required"));
      }
      if(getPayeeAccount() == null) {
         errors.add("payeeAccount", new ActionError("error.payeeAccount.required"));
      }
      if(getPayeeBank() == null) {
         errors.add("payeeBank", new ActionError("error.payeeBank.required"));
      }
      // TODO test format/data
      return errors;
   }
}
